/*
 * libsvn.h
 *
 *  Created on: 01/10/2013
 *      Author: asc
 */

#ifndef LIBSVN_H_
#define LIBSVN_H_


#if HAVE_CONFIG_H
#include <config.h>
#endif

/*
 *
 */
#include "RepoTemplate/RepoTemplate.h"
#include "utils/utils.h"
#include <string>
#include <map>
#include <libxml++/libxml++.h>
#include <iostream>
#include <exception>
#include <locale>

namespace Libsvn {

	enum keys_svn{log=1, logentry, revision, author, date, msg, paths, path, action, kind};
	map<string,keys_svn> resolv_key_svn =
	{
			{"log"		,log},
			{"logentry"	,logentry},
			{"revision"	,revision},
			{"author"	,author},
			{"date"		,date},
			{"msg"		,msg},
			{"paths"	,paths},
			{"path"		,path},
			{"action"	,action},
			{"kind"		,kind}
	};

	class Libsvn : public RepoTemplate
	{
	public:
		Libsvn();
		Libsvn(string fileName);
		~Libsvn();
		void read();
		void parse();
	private:
		void parseSubTree(xmlpp::TextReader &reader);

	};

}  // namespace libsvn

#endif /* LIBSVN_H_ */
